﻿using System.Windows;

namespace Report.Forms
{
    /// <summary>
    /// FrmAddParam.xaml 的交互逻辑
    /// </summary>
    public partial class FrmAdd : Window
    {
        public string StrName { get; private set; }
        public string Value { get; private set; }

        public FrmAdd()
        {
            InitializeComponent();
            Resources.MergedDictionaries.Add(ReportCommon.GetLan);
        }

        private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void BtnOk_OnClick(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(TxtName.Value) || string.IsNullOrEmpty(TxtValue.Value)) return;
            StrName = TxtName.Value;
            Value = TxtValue.Value;
            DialogResult = true;
            //var manager = ReportManager.Create();
            //manager.AddParam(TxtName.Text, TxtValue.Text);
            Close();
        }
    }
}
